import request from '@/utils/request'

// 查询企业食品质量安全风险列表
export function listOpmFoodSafeRisk(query) {
  return request({
    url: '/food/opmFoodSafeRisk/list',
    method: 'get',
    params: query
  })
}

// 查询企业食品质量安全风险详细
export function getOpmFoodSafeRisk(id) {
  return request({
    url: '/food/opmFoodSafeRisk/' + id,
    method: 'get'
  })
}

// 新增企业食品质量安全风险
export function addOpmFoodSafeRisk(data) {
  return request({
    url: '/food/opmFoodSafeRisk',
    method: 'post',
    data: data
  })
}

// 修改企业食品质量安全风险
export function updateOpmFoodSafeRisk(data) {
  return request({
    url: '/food/opmFoodSafeRisk',
    method: 'put',
    data: data
  })
}

// 删除企业食品质量安全风险
export function delOpmFoodSafeRisk(id) {
  return request({
    url: '/food/opmFoodSafeRisk/' + id,
    method: 'delete'
  })
}
